<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" lang="zh-CN">
<tiles:insertAttribute name="head" />
<body>
<div id="page" class="container">
	<div id="header">
		<div id="topbar" class="head_p">
			<p>
				<security:authorize ifAllGranted="ROLE_USER">
					<c:if test="${pageContext.request.userPrincipal != null}">
						Welcome, <a href="<c:url value="/users/go" />"><security:authentication property="principal.nickname"/></a> |
					</c:if>
					<a href="<c:url value="/logout" />">Logout</a>
				</security:authorize>
				<security:authorize ifAllGranted="ROLE_ANONYMOUS">
					<a href="<c:url value="/login" />">Login</a>
					<a href="<c:url value="/users/register" />">Register</a>
				</security:authorize>
			</p>
		</div>
		<div id="logo" class="head_p">
			<p>
				<a href="<c:url value="/hotels/search" />">
					<img src="<c:url value="/resources/images/header.jpg"/>" alt="Spring Travel" />
				</a>
			</p>
		</div>
		<div id="menu" class="nav_sub">
			<tiles:insertAttribute name="menu" />
		</div>
		
	</div>
	<div id="content">
		<div id="main" class="span-18">
			<tiles:insertAttribute name="body" />
		</div>
		<div id="local" class="span-6 last">
			<tiles:insertAttribute name="nav" />
		</div>
	</div>
	<hr />
	<div id="footer">
		<tiles:insertAttribute name="footer" />
	</div>
</div>
</body>
</html>